Skip to content

Fix user-space data write with incorrect offset #67

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 29, 2025

Conversation

RoyWFHuang
Copy link
Collaborator

The simplefs_write will copy data from user space. If the

input length is larger than BLOCK_SIZE, the data will not be copied from user space buffer.

"dd" or "print" writes in batches, but "cat" writes the entire data at one.
So we add print and cat commands to test simplefs_write function.

close #66

Copy link
Collaborator

@jserv jserv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Refine git commit message and append Close #66 at the end.

@RoyWFHuang RoyWFHuang force-pushed the bug/issue66_write branch 2 times, most recently from df3b0ae to bcba118 Compare March 29, 2025 03:12
@RoyWFHuang RoyWFHuang changed the title Fix user-space data write with correct offset Fix user-space data write with incorrect offset Mar 29, 2025
Copy link
Collaborator

@jserv jserv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rebase the latest master branch.

	The simplefs_write will copy data from user space. If the
input length is larger than BLOCK_SIZE, the data will not be copied
from user space buffer.

close sysprog21#66
@jserv jserv merged commit a6801fa into sysprog21:master Mar 29, 2025
2 checks passed
@RoyWFHuang RoyWFHuang deleted the bug/issue66_write branch March 29, 2025 04:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

questionable code: always copy data from the beginning of buf when file is writing
2 participants